<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
    <title th:text="${pageTitle}"></title>
    <div data-th-replace="layout/head-top"></div>
    <link rel="stylesheet" type="text/css" th:href="@{{path}/admin/v3/css/plugins/zTree/metroStyle/metroStyle.css?v={v}(path=${staticPath},v=${v})}"/>
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInLeft">
        <div data-th-replace="common/functionDepict"></div>
        <div>
            <div class="row">
                <input type="hidden" id="courseId" th:value="${course['id']}">
                <input type="hidden" id="subjectIds" th:value="${course['subjectIds']}">
                <input type="hidden" id="courseTypeKey" th:value="${course['courseTypeKey']}">
                <input type="hidden" id="status" th:value="${course['status']}">
                <div class="pt10">
                    <div class="col-sm-12">
                        <div class="ibox float-e-margins">
                            <div class="ibox-title">
                                <h5>设置课程排课目录 - 此处可设置 课程目录 总章节</h5>
                            </div>
                            <div class="ibox-content clearfix pt10">
                                <div>
                                    <div>
                                        <div class="form-horizontal">
                                            <th:block th:if="${course['courseTypeKey']!='LIVE' && course['courseTypeKey']!='PACKAGE' && course['courseTypeKey']!='SMALL'} ">
                                                <div class="site-title">
                                                    <fieldset><legend><span class="fs18">教学工具</span></legend></fieldset>
                                                </div>
                                                <div class="form-group">
                                                    <div class="col-sm-1 text-right">
                                                        学习限制
                                                    </div>
                                                    <div class="col-sm-10">
                                                        <div class="radio i-checks">
                                                            <label>
                                                                <input th:checked="${course['studyLimit']}==1" type="radio" name="studyLimit" value="1"/>无限制-不做任何学习规则限定
                                                            </label>
                                                        </div>
                                                        <div class="radio i-checks">
                                                            <label>
                                                                <input th:checked="${course['studyLimit']}==2" type="radio" name="studyLimit" value="2"/>顺序学习模式-必须按照课程的目录章节的顺序进行学习，不可跨章节学习
                                                            </label>
                                                        </div>
                                                        <div class="radio i-checks">
                                                            <label>
                                                                <input th:checked="${course['studyLimit']}==3" type="radio" name="studyLimit" value="3"/>随堂练习模式-必须通过课程中章或节设置的随堂练习题并达到设定的得分率后方可学习下一章或节(此模式包含顺序模式)
                                                            </label>
                                                        </div>
                                                    </div>
                                                </div>
                                            </th:block>
                                            <div th:classappend="${course['studyLimit']} =='3'?'':'hide'" class="form-group score-percent-box">
                                                <div class="hr-line-dashed"></div>
                                                <div class="col-sm-1 text-right">
                                                    <i class="c-red">*</i>  得分率
                                                </div>
                                                <div class="col-sm-8">
                                                    <div class="input-group m-b">
                                                        <span class="input-group-addon">%</span>
                                                        <input class="form-control" name="scorePercent" th:value="${#strings.isEmpty(course['scorePercent'])}?'0':${course['scorePercent']}">
                                                        <span class="input-group-addon">.00</span>
                                                    </div>
                                                    <span class="help-block m-b-none c-999"> 随堂练习得分率 可精确到小数点后两位。不填写默认得分率为0，等同于顺序学习</span>
                                                </div>
                                            </div>
                                        </div>
                                        <hr th:if="${course['courseTypeKey']!='LIVE' && course['courseTypeKey']!='PACKAGE'} "/>
                                        <div class="form-horizontal mt10">
                                            <div class="site-title">
                                                <fieldset><legend>
                                                    <span class="fs18">排课目录</span>
                                                    <span class="ml10 fs14 c-master hand"
                                                          data-container="body"
                                                          data-html="true"
                                                          data-toggle="popover"
                                                          data-trigger="hover"
                                                          data-placement="right"
                                                          data-content="<strong>设置课程目录须知:</strong>
                                            <p>1、章或节上当鼠标移入对应节点上时即可调出 “添加”、“修改”、“删除”、“向上排序”、“向下排序”等快捷操作菜单。</p>
                                            <p>2、音视频时长分别为资源的时长；直播为创建直播间的开始与结束时长差；文章类型为自己输入的时间。</p>
                                            <p>3、新建章节时：如需设置只为一级目录结构时，节点类型请选择为：节类型。此节点支持挂载 资源、资料、练习等属性！（注：当新建为 一级目录结构时，此节点不支持 添加 子节点操作。）</p>
                                            <p>4、如新建课程第一步基础信息操作中“学习限制”属性 选择了：“顺序练习模式”或“随堂练习模式”时，当在课程上架后请慎重操作 课程目录 章节的 向上下排序操作，以免造成前台用户学习数据的不准确。</p>"
                                                          data-original-title="" title="">
                                                        <i class="fa fa-exclamation-circle"></i>
                                                    </span>
                                                </legend></fieldset>
                                            </div>
                                            <div class="form-group">
                                                <div class="col-sm-4">
                                                    <input id="search" class="form-control" placeholder="输入章节名搜索">
                                                </div>
                                                <div class="col-sm-8">
                                                    <button th:if="${course['contextStatus']}!=2" class="btn btn-primary " type="button" id="appendCatalog"><i class="fa fa-plus"></i>&nbsp;新建章节</button>
                                                    <button th:if="${course['courseTypeKey']} !='LIVE' and ${course['contextStatus']}!=2" class="btn btn-primary " type="button" id="selectMould"><i class="fa fa-plus"></i>&nbsp;导入模块</button>
                                                    <button type="button" id="saveCancel" class="btn btn-w-m btn-danger mb10">确定并返回</button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="ibox-content-tree" style="background-color: #fff;">
                                            <div class="row">
                                                <div class="col-sm-8">
                                                    <div id="ztree" class="ztree" style="background-color: #fff"></div>
                                                    <div class="noDataTipsBox">
                                                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                                                    </div>
                                                </div>
                                                <div class="col-sm-4">

                                                    <div>
                                                        <div class="ibox-content-tree">
                                                            <h5>
                                                                <span class="c-111">| 目录总时长：</span>
                                                                <span class="ml10 fs12 c-ccc hand"
                                                                      data-container="body"
                                                                      data-html="true"
                                                                      data-toggle="popover"
                                                                      data-trigger="hover"
                                                                      data-placement="right"
                                                                      data-content="<strong>时长规则:</strong>
                                            <p>1、章节挂载教学资源类型为：音频、视频、直播、文章等</p>
                                            <p>2、音视频时长分别为资源的时长；直播为创建直播间的开始与结束时长差；文章类型不计入。</p>
                                            <p>3、总时长为：每个已挂载章节的资源时长的总和。目录总时长即为课程总时长。</p>"
                                                                      data-original-title="" title="">
                                                        <i class="fa fa-exclamation-circle"></i>
                                                    </span>
                                                            </h5>
                                                            <section class="m-t m-l hide" id="durationMsg">
                                                                <i class="fa fa-exclamation-circle c-red"></i>
                                                                <span class="c-red m-l-xs">
                                                                    0分钟
                                                                </span>
                                                            </section>
                                                            <section class="m-t m-l-lg">
                                                                <span class="fs18" id="durationSum"></span>
                                                            </section>
                                                        </div>
                                                    </div>
                                                    <div class="m-t">
                                                        <div class="ibox-content-tree">
                                                            <h5>
                                                                <span class="c-111">| 授课讲师：</span>
                                                            </h5>
                                                            <section class="m-t m-l hide" id="teacherMag">
                                                                <i class="fa fa-exclamation-circle c-red"></i>
                                                                <span class="c-red m-l-xs">
                                                            还没有讲师啊。
                                                            课程的讲师来源于：排课目录中的 教学素材资源 对应的讲师。所以请快创建吧！
                                                        </span>
                                                            </section>
                                                            <section class="m-t m-l-lg" id="teacherName">
                                                            </section>
                                                        </div>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div data-th-replace="layout/head-footer"></div>
    <script type="text/javascript" th:src="@{{path}/admin/libs/plugins/zTree/jquery.ztree.all.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/mould/common-select-mould.js?v={v}(path=${staticPath},v=${v})}"></script>
    <script type="text/javascript" th:src="@{{path}/admin/business/course/catalog/save_course_catalog.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>
